from rest_framework.response import Response
from rest_framework.views import APIView


# Create your views here.

class TestView(APIView):
    def get(self, request, *args, **kwargs):
        num = request.GET.get("num")
        if not num.isdigit():
            raise Exception("Test exception")
        return Response({"message": "This will not be returned"})


class TestView1(APIView):
    def get(self, request, *args, **kwargs):
        return Response({"message": "TestView1"})
